package multiProocess;

class MyThread2 extends Thread {
    private String name;
    private Integer threadCount = 10;

    public MyThread2(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < threadCount; i++) {
            System.out.println(name + "运行，i = " + i);
        }
    }
}
public class ThreadDemo02 {
    public static void main(String[] args) {
        MyThread2 mt1 = new MyThread2("线程A ");
        MyThread2 mt2 = new MyThread2("线程B ");
        mt1.start();
        mt2.start();
    }
}
